@model ShivamEMR.Model.Domain.PatientDomain.PatientTest

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.Result)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Result)
    @Html.ValidationMessageFor(model => model.Result)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.DateAndTime)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.DateAndTime)
    @Html.ValidationMessageFor(model => model.DateAndTime)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Notes)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Notes)
    @Html.ValidationMessageFor(model => model.Notes)
</div>

<div class="editor-label">
    Test
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.TestID, ((IEnumerable<ShivamEMR.Model.Domain.MedicalDomain.Test>)ViewBag.PossibleTests).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.TestID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.TestID)
</div>
<div class="editor-label">
    Picture
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.PictureID, ((IEnumerable<ShivamEMR.Model.Domain.PatientDomain.PatientTestPicture>)ViewBag.PossiblePictures).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Title), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.PictureID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.PictureID)
</div>
<div class="editor-label">
    Patient
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.PatientID, ((IEnumerable<ShivamEMR.Model.Domain.PatientDomain.Patient>)ViewBag.PossiblePatients).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Title), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.PatientID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.PatientID)
</div>
<div class="editor-label">
    Venue
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.VenueID, ((IEnumerable<ShivamEMR.Model.Domain.CRMDomain.Venue>)ViewBag.PossibleVenues).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Title), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.VenueID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.VenueID)
</div>
<div class="editor-label">
    Technician
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.TechnicianID, ((IEnumerable<ShivamEMR.Model.Domain.CompanyDomain.Employee>)ViewBag.PossibleTechnicians).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Title), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.TechnicianID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.TechnicianID)
</div>
